import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class main {

	public static void main(String[] args) throws IOException {
		int a = 10;
		int RollNumber[]=new int[a];
		String StudentName[]=new String[a];
		while (true) {
			System.out.println("1.Add student name");
			System.out.println("2.Modify student name");
			System.out.println("3.Delete Student Details");
			System.out.println("4.Display Students Name");
			System.out.println("Enter the option Details");
			BufferedReader brObj = new BufferedReader(new InputStreamReader(
					System.in));
			String value = brObj.readLine();
			int j = 0;
			if (value.equals("1")) {

				System.out.println("1.Enter Student Roll Number");
				BufferedReader brObj1 = new BufferedReader(
						new InputStreamReader(System.in));
				String value1 = brObj1.readLine();
				int rollNo = Integer.parseInt(value1);
				RollNumber[j] = rollNo;
				//j++;

				System.out.println("1.Enter Student Name");
				BufferedReader brObj2 = new BufferedReader(
						new InputStreamReader(System.in));
				String value2 = brObj2.readLine();
				StudentName[j] = value2;
				j++;
			} else if (value.equals("2")) {
				System.out.println("1.Enter Student Roll Number");
				BufferedReader brObj1 = new BufferedReader(
						new InputStreamReader(System.in));
				String value1 = brObj1.readLine();
				int rollNo = Integer.parseInt(value1);
				for (int x = 0; x < a; x++) {
					if (RollNumber[x] == rollNo) {
						System.out.println("1.Enter Student Name");
						BufferedReader brObj2 = new BufferedReader(
								new InputStreamReader(System.in));
						String value2 = brObj2.readLine();
						StudentName[x] = value2;
						break;
					}
				}
			} else if (value.equals("3")) {
				System.out.println("1.Enter Student Roll Number");
				BufferedReader brObj1 = new BufferedReader(
						new InputStreamReader(System.in));
				String value1 = brObj1.readLine();
				int rollNo = Integer.parseInt(value1);
				for (int x = 0; x < a; x++) {
					if (RollNumber[x] == rollNo) {
						//	System.out.println("1.Enter Student Name");
						//	BufferedReader brObj2= new BufferedReader(new InputStreamReader(System.in));
						//	String value2 = brObj.readLine();
						StudentName[x] = null;
						j--;
					}
				}
			} else if (value.equals("4")) {
				System.out.println(a);
				for (int j1 = 0; j1 < a; j1++) {
					System.out
							.print("RollNumber[" + j1 + "]:" + RollNumber[j1]);
					System.out.println("\tStudentName[" + j1 + "]:"
							+ StudentName[j1]);
				}

			}
		}
	}

}

